package top.porchwood.jweb.mcsm.config;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

@Controller
public class IndexController {
    private static final Logger logger = LogManager.getLogger();
    //@RequestMapping("/")
    //public String hello(HttpServletRequest request){
    //    return "redirect:/index.html";
    //}
    @RequestMapping("*/")
    public String redirectTo(HttpServletRequest request){
        //logger.info("redirect:%sindex.html".formatted(request.getRequestURI()));
        return "redirect:%sindex.html".formatted(request.getRequestURI());
    }
}
